﻿using VirtualTournaments.DataAccess.SqlServer.DataProxies;
namespace VirtualTournaments.DataAccess.SqlServer.DataMappers
{
	internal sealed class TournamentPodiumBetTargetsDataMapper : AbstractDataMapper<SqlServer.TournamentPodiumBetTarget, Business.Bets.TournamentPodiumBetTarget, DataProxies.TournamentPodiumBetTargetDataProxy>
	{
		#region Singleton implementation

		private static TournamentPodiumBetTargetsDataMapper _instance = null;
		private static object _instanceLocker = new object();

		private TournamentPodiumBetTargetsDataMapper() { }

		public static TournamentPodiumBetTargetsDataMapper Instance
		{
			get
			{
				if (_instance == null)
				{
					lock (_instanceLocker)
					{
						if (_instance == null)
						{
							_instance = new TournamentPodiumBetTargetsDataMapper();
						}
					}
				}
				return _instance;
			}
		}

		#endregion

		internal override VirtualTournamentsDataContext GetDataContext()
		{
			return VirtualTournamentsDataContext.Instance;
		}

		internal override System.Data.Linq.Table<TournamentPodiumBetTarget> GetDataTable()
		{
			return GetDataContext().TournamentPodiumBetTargets;
		}

		internal override Business.Bets.TournamentPodiumBetTarget DataObject2BusinessObject(TournamentPodiumBetTarget dataObject)
		{
			return new TournamentPodiumBetTargetDataProxy(dataObject);
		}

		internal override void BusinessObject2DataObject(Business.Bets.TournamentPodiumBetTarget businessObject, TournamentPodiumBetTarget dataObject)
		{
			throw new System.NotImplementedException();
		}

		internal override void DataProxy2DataObject(TournamentPodiumBetTargetDataProxy dataProxy, TournamentPodiumBetTarget dataObject)
		{
			throw new System.NotImplementedException();
		}
	}
}
